<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Try to avoid this showing up in search results if accidentally made public -->
    <meta name="robots" content="noindex">
    <meta name="googlebot" content="noindex">
    
    <title>CloudMapper AWS Security Report</title>
    
    <link href="../css/bootstrap.css" rel="stylesheet">
    <link href="../css/lato.css" rel="stylesheet">

    <link href="../css/report.css" rel="stylesheet">

    <script src="../js/chart.js"></script>
    <script src="../js/report.js"></script>

    <link rel="icon" href="../favicon.ico" sizes="16x16 32x32 64x64" type="image/vnd.microsoft.icon">
</head>

<body>
    <div class="stretchforfooter">
        <div class="container">
            <nav class="navbar navbar-default" role="navigation">
                <div class="navbar-header">
                    <a class="navbar-brand" href="https://summitroute.com"></a>
                </div>
                <div>
                    <ul class="nav navbar-nav navbar-right">
                        <li><h1>CloudMapper Report</h1><i class="muted">CloudMapper v{{t.version}}<p>Report developed by <a href="https://summitroute.com/">Summit Route</a></i></li>
                    </ul>
                </div>
            </nav>
        </div>

        <hr class="gradient">

          <div class="container">
        <div class="row">

<div class="content, report">
    <div class="row">
        <div class="col-sm-12">
<h1>Contents</h1>
<ul>
    <li><a href="#account-summary" id="account-summary">Account Summary</a>
    <ul>
        <li><a href="#accounts-reviewed">Accounts reviewed</a>
        <li><a href="#resources">Resources</a>
        <ul>
            <li><a href="#resource-counts">Resource counts</a>
            <li><a href="#region-usage">Region usage</a>
        </ul>
        <li><a href="#iam">IAM</a>
        <li><a href="#public-network-resources">Public network resources</a>
        <ul>
            <li><a href="#counts-of-public-resources-by-type">Counts of public resources by type</a>
            <li><a href="#counts-of-public-resources-by-port-ranges">Counts of public resources by port ranges</a>
        </ul>
    </ul>
    <li><a href="#findings-summary">Findings Summary</a>
    <ul>
        <li><a href="#counts-of-findings-by-account">Counts of finding types by account</a>
        <li><a href="#links-to-findings">Links to findings</a>
        <li><a href="#counts-of-findings-by-account">Counts of findings by account</a>
    </ul>
    <li><a href="#findings">Findings</a>
</ul>

<h1><a href="#account-summary" id="account-summary">Account Summary</a></h1>
<h2><a href="#accounts-reviewed" id="accounts-reviewed">Accounts reviewed</a></h2>
<table id='accounts'>
    <tr><th>Account name</th><th>Account ID</th><th>Collection date</th></tr>
    {% for account in t.accounts %}
        <tr><td>{{ account.name }}<td>{{ account.id }}<td>{{ account.collection_date }}</tr>
    {% endfor %}
</table>

<h2><a href="#resources" id="resources">Resources</a></h2>

<h3><a href="#resource-counts" id="resource-counts">Resource counts</a></h3>

<div><canvas id="resource_counts"></canvas></div>
<script>makeChart("resource_counts", {{t.account_names}}, {{ t.resource_data_set }}, legend=true, x_axes=true, y_axes=true)</script>



<table id='resources' class='rotated'>
    <tr><th></th>
    {% for key in t.resource_names %}
        <th class="rotate"><div><span>{{ key }}</span></div></th>
    {% endfor %}
    </tr>

    {% for row in t.resource_stats %}
    <tr>
        {% for k in row %}
            {% if k == 0 %}
            <td class="muted">
            {% elif k is number %}
            <td class="highlight">
            {% else %}
            <td>
            {% endif %}
            
            {{ k }}</td>
        {% endfor %}
    </tr>
    {% endfor %}
    
</table>



<h3><a href="#region-usage" id="region-usage">Region usage</a></h3>
<p>This table shows whether a region contains the resources being counted. Currently all S3 buckets, no matter their location, and CloudFronts, are identified as being in us-east-1.</p>

<table id='regions' class='rotated'>
        <tr><th></th>
        {% for key in t.region_names %}
            <th class="rotate"><div><span>{{ key }}</span></div></th>
        {% endfor %}
        </tr>
    
        {% for account in t.accounts %}
        <tr>
            <td>{{ account.name }}</td>
            {% for region in t.region_names %}
                {% if t.region_stats[account.name][region] == 'N' %}
                <td></td>
                {% else %}
                <td class="highlight"><div class="mytooltip">Y<span class="tooltiptext">{{ t.region_stats_tooltip[account.name][region] }}</span></div></td>
                {% endif %}
            {% endfor %}
        </tr>
        {% endfor %}
        
    </table>

<h2><a href="#iam" id="iam">IAM</a></h2>
<div><canvas id="iam_active"></canvas></div>
<script>makeChart("iam_active", {{t.account_names}}, {{ t.iam_active_data_set }}, legend=true, x_axes=true, y_axes=true)</script>


<h2><a href="#public-network-resources" id="public-network-resources">Public network resources</a></h2>

<h3><a href="#counts-of-public-resources-by-type" id="counts-of-public-resources-by-type">Counts of public resources by type</a></h3>

<table id='public_network_resource_types' class='rotated'>
    <tr><th></th>
        {% for key in t.public_network_resource_type_names %}
            <th class="rotate"><div><span>{{ key }}</span></div></th>
        {% endfor %}
        </tr>
    
        {% for account in t.accounts %}
        <tr>
            <td>{{ account.name }}</td>
            {% for resource_type in t.public_network_resource_type_names %}
                {% set count = t.public_network_resource_types[account.name][resource_type] %}
                {% if count == 0 %}
                    <td class="muted">
                {% else %}
                    <td class="highlight">
                {% endif %}
                {{ count }}</td>
            {% endfor %}
        </tr>
        {% endfor %}
</table>

<h3><a href="#counts-of-public-resources-by-port-ranges" id="counts-of-public-resources-by-port-ranges">Counts of public resources by port ranges</a></h3>
<div><canvas id="public_ports"></canvas></div>
<script>makeChart("public_ports", {{t.account_names}}, {{ t.public_ports_data_set }}, legend=true, x_axes=true, y_axes=true)</script>

<hr>
<h1><a href="#findings-summary" id="findings-summary">Findings Summary</a></h1>

<h2><a href="#counts-of-findings-by-account" id="counts-of-findings-by-account">Counts of finding types by account</a></h2>
<div><canvas id="finding_types_chart"></canvas></div>
<script>makeChart("finding_types_chart", {{t.account_names}}, {{ t.findings_severity_by_account_chart }}, legend=true, x_axes=true, y_axes=true)</script>

<h2><a href="#links-to-findings" id="links-to-findings">Links to findings</a></h2>
{% for severity in t.severities %}
    {% if t.severities[severity]|length > 0 %}
        <b>{{ severity }}</b>
        <ul>
        {% for finding in t.severities[severity] %}
            <li> <a href="#{{ t.severities[severity][finding].id }}">{{ t.severities[severity][finding].title }}</a>
        {% endfor %}
        </ul>
    {% endif %}
{% endfor %}


<h2><a href="#counts-of-findings-by-account" id="counts-of-findings-by-account">Counts of findings by account</a></h2>
<div><canvas id="findings_chart"></canvas></div>
<script>makeChart("findings_chart", {{t.account_names}}, {{ t.finding_counts_by_account_chart }}, legend=true, x_axes=true, y_axes=true)</script>

<hr>
<h1><a href="#findings" id="findings">Findings</a></h1>
{% for finding_group in t.findings %}
<h2>{{ finding_group }}</h2>

{% for issue_id in t.findings[finding_group] %}
    <div class="section"><a name="{{issue_id}}"></a>
    {% set finding = t.findings[finding_group][issue_id] %} 
    <h3>{{ finding['title'] }}</h3>
    <p><b style="background-color: {{finding['severity_color']}}">Severity: {{finding['severity']}}</b><br>
    <b>Issue ID:</b> {{issue_id}}</p>
    <p>{{finding['description']}}
    <hr>


    <ul>
    {% set account_hits = t.findings[finding_group][issue_id]['accounts'] %}
    {% for account in account_hits %}
    <li>{{account_hits[account]['account_name']}} ({{account}})
        <ul>
        {% for region in account_hits[account]['regions'] %}

        
            {% if not t.findings[finding_group][issue_id]['is_global'] %}<li>{{region}} {% endif %}
            <ol>
                {% set hits = account_hits[account]['regions'][region]['hits'] %}
                {% for hit in hits %}
                    {% if hit['resource'] is not none%}<li> {{hit['resource']}}{% endif %}
                    {% if hit['details'] != 'null'%}
                    <pre>{{hit['details']}}</pre>
                    {% endif %}
                {% endfor %}
            </ol>
        {% endfor %}
        </ul>
    {% endfor %}
    </ul>
    </div>
{% endfor %}
{% endfor %}



<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>